package com.hevs.samplewebapp.server.dao;

import java.util.List;

import com.hevs.samplewebapp.server.entities.InternalMessage;
import com.hevs.samplewebapp.server.entities.User;

/**
 * Interface for the Internal message DAO
 * 
 * @author Arnaud Durand
 * @date 23.04.2012
 *
 */
public interface InternalMessageDAO {
	
	/**
	 * Method to send a message to another person inside the application
	 * @param local
	 * the sender of the message
	 * @param remote
	 * the receiver of the message
	 * @param mail
	 * the content of the message
	 */
	public abstract void send(User local, User remote, InternalMessage mail);
	
	/**
	 * Method to retrieve the messages from the server
	 * @param local
	 * the receiver of the messages
	 * @return
	 * a List of InternalMessages
	 */
	public abstract List<InternalMessage> getAll(User local);
	
	/**
	 * Method to delete an InternalMessage
	 * @param mail
	 * the internal message to delete
	 */
	public abstract void remove(InternalMessage mail);
}
